-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
31 create a method to record the simulation #32
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit adds the ability to record the current state of the environment during simulation. It introduces the `recording_enabled` parameter to the `RobotEnv` class, which when set to `True`, enables recording of states. The recorded states are stored in a list and can be saved to a file using the `save_recording()` method. Additionally, the `reset()` method now checks if recording is enabled and saves the recording before resetting the state list.
This commit adds a test for the recording functionality in the `RobotEnv` class. The test ensures that the recording is created and saved correctly, and that the recorded states are instances of `VisualizableSimState`.
… have a persistent folder
This commit adds a README.md file explaining the purpose of the Pygame specific test and why it cannot be run in the CI environment. The README.md file provides context for developers who encounter the test and clarifies that it is meant to be run locally.
This commit adds a test case to verify the functionality of loading and visualizing recorded states in the `test_load_and_visualize_states` module. The test creates a temporary file, saves a list of `VisualizableSimState` instances to the file using pickle, loads the states from the file, and checks if the loaded states match the original states. Additionally, the commit demonstrates how to use the `visualize_states` function. The temporary file is deleted after the test.
This commit modifies the `RobotEnv` class in `demo_offensive.py` to enable the recording of states during simulation. The `recording_enabled` parameter is added to the `RobotEnv` constructor, allowing the recording of states when set to `True`. Additionally, the `reset()` method now saves the recording before resetting the state list. This change enhances the functionality of the `RobotEnv` class by providing the ability to record and save simulation states.
What needs to be improved is that during playback it is not possible to move the camera. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
look at
test_pygame/test_load_and_visualize_states.py
for implementation details.